using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_AuxItemMap : EntityTypeConfiguration<t_AuxItem>
    {
        public t_AuxItemMap()
        {
            // Primary Key
            this.HasKey(t => t.FItemID);

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNumber)
                .IsRequired()
                .HasMaxLength(128);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(128);

            this.Property(t => t.FFullNumber)
                .IsRequired()
                .HasMaxLength(128);

            this.Property(t => t.FShortNumber)
                .HasMaxLength(80);

            this.Property(t => t.FFullName)
                .HasMaxLength(128);

            this.Property(t => t.FModifyTime)
                .IsFixedLength()
                .HasMaxLength(8)
                .IsRowVersion();

            this.Property(t => t.FHelpCode)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("t_AuxItem");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FItemClassID).HasColumnName("FItemClassID");
            this.Property(t => t.FNumber).HasColumnName("FNumber");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FParentID).HasColumnName("FParentID");
            this.Property(t => t.FUnUsed).HasColumnName("FUnUsed");
            this.Property(t => t.FFullNumber).HasColumnName("FFullNumber");
            this.Property(t => t.FDeleted).HasColumnName("FDeleted");
            this.Property(t => t.FShortNumber).HasColumnName("FShortNumber");
            this.Property(t => t.FFullName).HasColumnName("FFullName");
            this.Property(t => t.UUID).HasColumnName("UUID");
            this.Property(t => t.FModifyTime).HasColumnName("FModifyTime");
            this.Property(t => t.FSystemType).HasColumnName("FSystemType");
            this.Property(t => t.FUseSign).HasColumnName("FUseSign");
            this.Property(t => t.FChkUserID).HasColumnName("FChkUserID");
            this.Property(t => t.FHelpCode).HasColumnName("FHelpCode");
        }
    }
}
